function GetTwittes() {
	/*"http://search.twitter.com/search.json?q="+ searchString +"",*/
	var searchString = $("#x").attr("value");
	console.log(searchString)
	$.ajax({
		type: "GET",
		url:"/poll" ,  
		dataType:"json",
		success:function(jsonResp){
			var jsonData = JSON.parse(jsonResp)
			console.log( jsonData)
		}
		
	})
}



function upperCase()
		{
		var x=document.getElementById("x");
		console.log("&&&&&&&&&&&&&&&&&&&")
		console.log(x.value)
		console.log("&&&&&&&&&&&&&&&&&&&")
		x.value=x.value.toUpperCase();
		$.ajax()
		
		
		
		
		}

function lookUp(){
	var url = "/search/"

	var input = document.getElementById('query').value;
	var output = document.getElementById('results');

	if(input != "") {	
		var xmlhttp = new XMLHttpRequest(); 
		xmlhttp.open("GET", url + input, true ); 
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 3) { 
				output.innerHTML = "loading..."
			}; 
			if (xmlhttp.readyState == 4) {
				
				var j = 0;
				var imgLine = 5;
				var size = 200;

				var html = ""
				
				var images = JSON.parse(xmlhttp.responseText)
				
				if(images.length == 0) {
					output.innerHTML = "No results."
				} else {
					for(element in images) {
						j = j%imgLine;
		
						if(j == 0) {
							html += "<tr>"
						}
		
						html += '<td width="200" height="200">'
						html += '<a href= "'+images[element].path+'"><img src="'+images[element].path+' "  width="200" height="200"/></a>'
						html += "</td>"
					
						if(j == 4) {
							html += "</tr>"
						}
						j++;
						
					}
			
					html = "<table>" + html + "</html>"
					output.innerHTML = html	
				}
				
			};
		
		} 
		xmlhttp.send();	
	} else {
		output.innerHTML = ""
	}
}